package com.wsl.dao;

import com.wsl.entity.blog.Type;
import com.wsl.entity.user.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

/**
 * @Author: wsl
 * @Date: 2022/4/1 10:19
 */
public interface UserDao extends JpaRepository<User,Long> {



    @Query("select u from User u where u.username = ?1 ")
    User findByUsername(String userName);

    @Query("select u from User u where u.username = ?1 and u.password = ?2")
    User findByUsernameAndPassword(String userName,String password);

}
